/* WrappedImage.java
 * Component: ProperJavaRDP
 * 
 * Revision: $Revision: 1.3 $
 * Author: $Author: telliott $
 * Date: $Date: 2005/09/27 14:15:39 $
 *
 * Copyright (c) 2005 Propero Limited
 *
 * Purpose: Adds functionality to the BufferedImage class, allowing
 *          manipulation of colour indices, making the RGB values
 *          invisible (in the case of Indexed Colour only).
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * 
 * (See gpl.txt for details of the GNU General Public License.)
 * 
 */
package net.propero.rdp;

import org.apache.log4j.Logger;

public class WrappedImage {
    static Logger logger = Logger.getLogger(WrappedImage.class);
    
    public void setRGB(int x, int y, int color) {
        //if(x >= bi.getWidth() || x < 0 || y >= bi.getHeight() || y < 0) return;
/*        
        if (cm != null)
        	color = cm.getRGB(color);
        bi.setRGB(x,y,color);
*/
    }

    public int getRGB(int x, int y){
        //if(x >= this.getWidth() || x < 0 || y >= this.getHeight() || y < 0) return 0;
/*        
        if(cm == null)
        	return bi.getRGB(x,y);
        else {
            int pix = bi.getRGB(x,y) & 0xFFFFFF;
            int[] vals = {(pix >> 16) & 0xFF,(pix >> 8) & 0xFF,(pix) & 0xFF};
            int out = cm.getDataElement(vals,0);
            if(cm.getRGB(out) != bi.getRGB(x,y)) logger.info("Did not get correct colour value for color (" + Integer.toHexString(pix) + "), got (" + cm.getRGB(out) + ") instead");
            return out;
        }
*/
    	return 0;
    }

}
